package Web;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Date;

import javax.xml.crypto.Data;

public class Server {
	private ServerSocket server;
	public static final String CRLF = "\r\n";
	public static final String BLANK = " ";
	public static void main(String[] args) {
		Server server = new Server();
		server.start();
		
	}
	public void start(){
		try {
			server = new ServerSocket(8888);
			this.recieve();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	private void recieve(){
		try {
			Socket socket = server.accept();
			String msg = null;
			byte[] data = new byte[2014];
			int len = socket.getInputStream().read(data);
			String requestInfo = new String(data, 0, len).trim();
			System.out.println(requestInfo);	
			
			StringBuilder responseContext = new StringBuilder();
			 
			
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
    public static void stop(){
    	
    }
}
